<%--
  Created by IntelliJ IDEA.
  User: xujc
  Date: 6/21/15
  Time: 10:10
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="s" uri="/struts-tags" %>
<html>
<head>
    <title><s:property value="discus.publishTime"/></title>
    <meta http-equiv="Content-Type" content="text/html" charset="utf-8"/>
</head>
<body>
<%@ include file="userheader.jsp" %>
<div>
    <s:a href="/s/form?fid=%{discus.fId}">返回</s:a>
</div>
<table>
    <tr>
        <th>
            用户
        </th>
        <th>
            内容
        </th>
        <th>
            发布时间
        </th>
        <th>
            楼层
        </th>
    </tr>
    <tr>
        <td>
            <s:property value="discus.userByUId.userName"/>
        </td>
        <td>
            <s:property value="discus.content"/>
        </td>
        <td>
            <s:date name="discus.publishTime" format="MM-dd HH:mm"/>
        </td>
        <td>
            楼主
        </td>
    </tr>

    <s:iterator value="discus.reviewsByDId" var="re">
        <tr>
            <td>
                <s:property value="#re.userByUId.userName"/>
            </td>
            <td>
                <s:property value="#re.content"/>
            </td>
            <td>
                <s:date name="#re.time" format="MM-dd HH:mm"/>
            </td>
            <td>
                <s:property value="#re.floor"/>
            </td>
        </tr>
    </s:iterator>
</table>
<div>
    <s:if test="#request.logined">
        <s:form action="doreview" method="post">
            <s:textfield name="content" label="content"/>
            <s:textfield name="anodid" type="hidden" value="%{discus.dId}"/>
            <s:textfield name="uid" type="hidden" value="%{#request.userEnti.uId}"/>
            <s:submit value="submit"/>
        </s:form>
    </s:if>
</div>
</body>
</html>
